package com.iscas.dataaggregation.domain.experiment;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import lombok.Data;

/**
 * 
 * @TableName faultcorrelation
 */
@TableName(value ="faultcorrelation")
@Data
public class Faultcorrelation implements Serializable {
    /**
     * 
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 演练计划id
     */
    private Integer plan_id;

    /**
     * 故障演练id
     */
    private Integer fault_config_id;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Faultcorrelation other = (Faultcorrelation) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getPlan_id() == null ? other.getPlan_id() == null : this.getPlan_id().equals(other.getPlan_id()))
            && (this.getFault_config_id() == null ? other.getFault_config_id() == null : this.getFault_config_id().equals(other.getFault_config_id()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getPlan_id() == null) ? 0 : getPlan_id().hashCode());
        result = prime * result + ((getFault_config_id() == null) ? 0 : getFault_config_id().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", plan_id=").append(plan_id);
        sb.append(", fault_config_id=").append(fault_config_id);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}